<?php
include("config.php");
include("getAddrByIp.class.php");

if($_GET['request'] == 1){
	$ip = convertip(getRealIpAddr());
	$addr = explode(" ",$ip);
	//echo iconv("gb2312","utf-8",$addr[0]);
	echo $addr[0];
}

if($_GET['request'] == 2){
	$re=mysql_query("select * from `image` where `id`='$_GET[id]'")or die(mysql_error());
	$row=mysql_fetch_array($re);
	$field = $_GET['field'];
	echo  $row[$field];
}
?>